![]() |
OPC-UA Embedded Server SDK
2.1.0
|
Functions | |
| const UA_UTF8_string_t * | UAServer_Callback_translate (uint16_t locale_index, uint32_t text_handle) |
| const UA_UTF8_string_t * | UAServer_Callback_translate_enumstrings (uint16_t locale_index, uint32_t enum_handle, uint16_t enum_index) |
| const UA_UTF8_string_t * | UAServer_Callback_translate_internal_text (uint16_t locale_index, uint32_t text_index) |
| const UA_UTF8_string_t* UAServer_Callback_translate | ( | uint16_t | locale_index, |
| uint32_t | text_handle | ||
| ) |
Function provided by host to enable library to translate text
The library requires the ability to translate human readable text in order to operate. This ability is provided by this function which must be implemented by the host system. This function is called by the library to get a pointer to the appropriate text for communication to a client using a specified and supported locale. This function is used to lookup translations for nodes created by the host system. A separate callback is used to lookup translations for internal text that the library uses to expose standard OPC-UA nodes in the address space.
| [in] | locale_index | The index into the previously provided locale table. Ignore if only one locale was provided. |
| [in] | text_handle | An identifier that the host can use to efficiently look up the text string. |
| const UA_UTF8_string_t* UAServer_Callback_translate_enumstrings | ( | uint16_t | locale_index, |
| uint32_t | enum_handle, | ||
| uint16_t | enum_index | ||
| ) |
Function provided by host to enable library to translate enumerated text
The library requires the ability to translate human readable text in order to operate. This ability is provided by this function which must be implemented by the host system. This function is called by the library to get a pointer to the appropriate text for communication to a client using a specified and supported locale. This function is used to lookup translations for nodes created by the host system. A separate callback is used to lookup translations for internal text that the library uses to expose standard OPC-UA nodes in the address space.
MultiStateDiscrete Data Access address space nodes contain an enumeration of possible values with a human readable label for each value of the enumeration. When creating the node the host passes in a handle to the enumeration and the number of values. For translation the library calls this function indicating the enumeration handle provided and the index of the required label.
| [in] | locale_index | The index into the previously provided locale table. Ignore if only one locale was provided. |
| [in] | enum_handle | An identifier that the host can use to efficiently look up the enumeration. |
| [in] | enum_index | An index into the value of the enumeration indicating the label to be returned. |
| const UA_UTF8_string_t* UAServer_Callback_translate_internal_text | ( | uint16_t | locale_index, |
| uint32_t | text_index | ||
| ) |
Function provided by host to enable library to translate internal text
The library exposes some standard OPC-UA nodes in the server address space. It may be desirable to translate the DisplayNames of these nodes. This API callback is provided to facilitate translation of this text. If you do not wish to provide translation of the internal text, simply return the default English text to the library. If you do wish to provide translated text for the internal text you should implement tables of UTF8 strings for each supported locale. Note: There is no requirement in the OPC-UA standard to provide translations of the internal text even if your server supports multiple locales. In this case nodes you add to the address space will be localized but the standard OPC-UA nodes will not.
| [in] | locale_index | The index into the previously provided locale table. Ignore if no table was provided. |
| [in] | text_index | An identifier that the host can use to efficiently look up the text string (a zero based table index). |